USE [NGroup.VTL.DB]
GO

/****** Object:  StoredProcedure [dbo].[DeleteProduct]    Script Date: 12/29/2013 13:47:36 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DeleteProduct]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[DeleteProduct]
GO

USE [NGroup.VTL.DB]
GO

/****** Object:  StoredProcedure [dbo].[DeleteProduct]    Script Date: 12/29/2013 13:47:36 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO



-- =============================================
-- Author:		Nguyen Vu Nam
-- Create date: 20131218
-- Description:	Update Product
-- =============================================
Create PROCEDURE [dbo].[DeleteProduct]
	@ID int,
	@IsActive bit,
	@LastUpdatedAt datetime,
	@LastUpdatedBy nvarchar(50)

AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

	UPDATE [NGroup.VTL.DB].[dbo].[Products]
	   SET [IsActive] = @IsActive
		  ,[LastUpdatedAt] = @LastUpdatedAt
		  ,[LastUpdatedBy] = @LastUpdatedBy
	 WHERE [ID] = @ID
END



GO

